
package editor.common
{	
	import flash.ui.Mouse;
	import flash.ui.MouseCursor;

	/**
	 * @author 缺硒
	 */
	public class CursorManager
	{
		public static const STATE_ADD_NPC:String = "addnpc";
		public static const STATE_ADD_PORT:String = "addport";
		public static const STATE_ADD_IN:String = "addin";
		public static const STATE_ADD_LINK:String = "addlink";
		public static const STATE_ADD_PRE:String = "addpre";
		public static const STATE_ADD_NEXT:String = "addnext";
		public static const STATE_NONE:String = "none";
		
		private static var __instance:CursorManager;
		
		private var _state:String = "none";
		
		public function get state():String
		{
			return _state;
		}

		public function set state(value:String):void
		{
			_state = value;
			
			if(_state　!= STATE_NONE)
				Mouse.cursor = MouseCursor.BUTTON;
			else Mouse.cursor = MouseCursor.ARROW;
		}

		public static function getInstance():CursorManager
		{
			if(__instance == null)
				__instance = new CursorManager(new Singleton());
			return __instance;
		}
		
		// 构造函数
		public function CursorManager(s:Singleton)
		{
			
		}
		//
	}
}
class Singleton{}